package com.rede.didiok.common.feign;

import java.util.List;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import com.rede.didiok.common.config.feign.FeignConfiguration;
import com.rede.didiok.common.dto.admin.AdminDto;
import com.rede.didiok.common.dto.user.UserDto;


/**
 * 后端服务feign远程调用
 *
 * @author 陌溪
 * @date 2023年6月20日23:27:24
 */

@FeignClient(name = "didiok-sms", contextId = "didiok-sms0", configuration = FeignConfiguration.class)
public interface SmsFeignClient {


    /**
     * 获取用户信息列表
     * @param userVO
     * @return
     */
    @RequestMapping(value = "/smsFeign/getUserListByPage", method = RequestMethod.POST)
    List<UserDto> getUserListByPage(UserDto userVO);

    /**
     * 获取管理员信息列表
     * @param adminVO
     * @return
     */
    @RequestMapping(value = "/smsFeign/getAdminListByPage", method = RequestMethod.POST)
    List<AdminDto> getAdminListByPage(AdminDto adminVO);

    /**
     * 获取用户钱包金额
     * @return
     */
    @RequestMapping(value = "/smsFeign/getUserAmount", method = RequestMethod.POST)
    String getUserAmount(@RequestParam(value = "userUid") String userUid);

    /**
     * 更新用户余额
     * @param userUid
     * @param amount
     * @return
     */
    @PostMapping("/smsFeign/updateAmountByUserUid")
    String updateAmountByUserUid(@RequestParam(value = "userUid")String userUid, @RequestParam(value = "amount") Long amount);

    /**
     * 获取文本答案
     * @param question
     * @return
     */
    @PostMapping("/smsFeign/getTextAnswer")
    String getTextAnswer(@RequestParam(value = "question") String question);

}